#include "history.h"
int main() {
	docHistory *hst=new docHistory();
	int ch;
	char str[300];
	char *tmp;
/*	do {
		printf("\n\nMenu\n");
		printf("1. Add\n");
		printf("2. Go Back\n");
		printf("3. Go Forward\n");
		printf("5. Quit\n");
		printf("Choice : ");
		scanf("%d",&ch);
		switch (ch) {
			case 1 : printf("\nURL : ");
				 scanf("%s",str);
				 hst->add(str);
				 break;
			case 2 : printf("%s",(hst->isBack())?(hst->getBack()):"Cannot!");
				 break;
			case 3 : printf("%s",(hst->isForward())?(hst->getForward()):"Cannot!");
				 break;
			case 4 : printf("%s",(hst->list->toString()));
				 break;
			default:
				 break;
		}
	} while (ch!=5);
*/
	hst->add("one");
	hst->add("two");
	hst->add("three");
	
	tmp=hst->list->toString();
	printf("%s \n",tmp);
	free(tmp);
	
	
	tmp=hst->getBack();free(tmp);
	hst->add("four");
	hst->add("five");
	hst->add("six");
	
	tmp=hst->list->toString();
	printf("%s \n",tmp);
	free(tmp);
	
	tmp=hst->getBack();free(tmp);
	tmp=hst->getBack();free(tmp);
	tmp=hst->getBack();free(tmp);
	tmp=hst->getForward();free(tmp);
	
	hst->add("seven");
	hst->add("eight");
	hst->add("nine");
	
	tmp=hst->list->toString();
	printf("%s \n",tmp);
	free(tmp);
	
	delete hst;		
	return 0;
}

